<!DOCTYPE html>
<html>

	<head>

		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title>详情——DETAIL</title>
		<link rel="stylesheet" type="text/css" href="../css/normalize.css" />
		<link rel="stylesheet" type="text/css" href="../css/home.css" />
		<link rel="stylesheet" type="text/css" href="../css/detail.css" />
		<link rel="stylesheet" type="text/css" href="../css/index1.css" />
	</head>

	<body>
		<div class="wrap">
			<div class="container">
				<!--导航栏-->
				<header>
					<div class="content">
						<a href="/index.html" class="headerLogo">
							<img class="logoimg" src="../img/logo.png" alt="logo" />
							<img class="logofont" src="../img/font_logo.png" alt="logofont" />
						</a>
						<ul class="headerNav">
							<!--<li class="active" style="opacity: 1.0;">-->
							<!--<div class="homeOption">自选</div>-->
							<!--<div class="optional">-->

							<!--</div>-->
							<!--</li>-->
							<li class="active">
								<div class="homeVol">市值</div>
							</li>
							<li class="active jys" style="position: relative;">
								<div class="jys_name">交易所</div>
								<div class="bourse">
									<ul style="color: #000;">
									</ul>
									<span class="jys_arro"></span>
								</div>
							</li>
						</ul>
						<div class="headerAdv">
							<img src="../img/home_ad_img.jpg" alt="navAdv" />
						</div>
					</div>
				</header>
				<!--内容区-->
				<section>
					<div class="content center btpadding">
						<ul class="top_detail">
							<li class="top_left1">
								<p class="detail_title">
									<img class="title_icon" src="" id="src_img" /></span>
									<span class="title_name" id="title_name"></span>
								</p>
								<div class="detail_price">
									<span class="price_val" id="price_val" style="display: none;">￥</span>
									<span class="price_val1 font_opacity" id="price_val1" style="display: none;"></span>
									<span class="price_rage" id="price_rage"></span>
									<p class="eq_rmb" style="display: none;" id="eq_rmb"><span>≈</span>￥</p>
								</div>
								<div class="detail_risefall">
									<p class="highest">24小时最高
										<span class="highest_val" id="highest_val">￥</span>
									</p>
									<p class="lowest">24小时最低
										<span class="lowest_val" id="lowest_val">￥</span>
									</p>
								</div>
							</li>
							<li class="top_left2">
								<div class="boxs">
									<p class="turnover_title">流通量</p>
									<p class="turnover_val">
										<span class="tn_val_data" id="tn_val_data"></span>
										<span class="tn_val_unit" id="tn_val_unit"></span>
									</p>
									<p class="ms_title">总发行量</p>
									<p class="ms_val">
										<span class="ms_val_data" id="ms_val_data"></span>
										<span class="ms_val_unit" id="ms_val_unit"></span>
									</p>
								</div>

							</li>
							<li class="top_right2">
								<div class="boxs" style="padding: 38px 0 0 40px">
									<p class="trade_title">24交易额</p>
									<p class="trade_val" id="trade_val">￥</p>
									<p class="trade_equ">
										<span class="trade_equ_val" id="trade_equ_val">≈</span>
										<span class="trade_equ_rank" id="trade_equ_rank"></span>
									</p>
								</div>
							</li>
							<!--
                        作者：chig@foxmail.com
                        时间：2018-01-25
                        描述：exchange交易所>>>exch
                    -->
							<li class="top_right1">
								<div class="boxs" style="padding: 32px 0 0 40px">
									<p class="exch_title">24h主交易所</p>
									<p class="exch_name">
										<img class="exch_name_icon" id="exch_name_icon" src="/" onerror="this.src = '../img/defaultIcon.png'" />
										<span class="exch_name_font" id="exch_name_font"></span>
									</p>
									<p class="exch_val">
										<span class="exch_val_rage" id="exch_val_rage"></span>
										<span class="exch_val_tips">成交占比</span>
									</p>
								</div>
							</li>
						</ul>
						<div class="midle1_detail">
							<ul class="introduce">
								<li class="intro_name">
									<p class="name_p">
										<span class="name_p_title">英文名：</span>
										<span class="name_p_font" id="name_p_font"></span>
									</p>
									<p class="time_p">
										<span class="time_p_title">发行时间：</span>
										<span class="time_p_font" id="time_p_font"></span>
									</p>

								</li>
								<li class="intro_rank">
									<p class="rank_p">
										<span class="rank_p_title">市值排名：</span>
										<span class="rank_p_font" id="rank_p_font"></span>
									</p>
									<p class="book_p">
										<span class="book_p_title">白皮书：</span>
										<span class="book_p_font" id="book_p_font"></span>
									</p>
								</li>
								<li class="intro_price">
									<p class="price_p">
										<span class="price_p_title">市值：</span>
										<span class="price_p_font" id="price_p_font">￥</span>
									</p>
									<!--历史最高弃掉-->
									<p class="history_p">
										<span class="history_p_title"></span>
										<span class="history_p_font"></span>
										<span class="history_p_time" style="background: #fff;"></span>
									</p>
								</li>

							</ul>
							<div class="relate_detail" style="margin-top: 5px;">
								<div class="relate_div">
									<div class="relate_div_title">相关概念：</div>
									<div class="relate_div_tips" id="relate_div_tips"></div>
								</div>

								<div class="detail_div" id="detail_div">
									<div class="detail_div_title">详细介绍：</div>
									<div class="detail_div_text">
										<span class="" id="span_content"></span>
										<a href="####" style="display: none;">查看全部</a>
									</div>

								</div>
							</div>

							<div class="sheet">
								<p class="sheet_title">ADA行情</p>
								<div class="sheet_lists">
									<ul class="lists_header">
										<li class="li_rank">排名</li>
										<li class="li_exch">交易所</li>
										<li class="li_pair">交易对</li>
										<li class="li_price">价格</li>
										<!--<li class="li_volume">成交量</li>-->
										<li class="li_turnover">成交额</li>
										<li class="li_percent">占比</li>
										<!--<li class="li_update">更新时间</li>-->
										<li class="li_status">状态</li>
									</ul>
									<ul class="lists_content" id="lists_content"></ul>
									<p class="release" id="release" style="display: none;" onclick="examine_btn()">查看全部</p>
								</div>
							</div>

						</div>

					</div>
				</section>

				<!--尾部-->
				<footer>
					<div class="content">
						<p class="copyright">copyright © 2018 KKTOKEN，粤ICP备17140751号-1·Powered By Weilaicaij</p>
						<ul class="linksTo">
							<li>友情链接:</li>
							<li>
								<a href="http://www.8btc.com/" target="_blank">巴比特</a>
							</li>
							<li>
								<a href="http://www.jinse.com/" target="_blank">金色财经</a>
							</li>
							<li>
								<a href="https://www.btc123.com/" target="_blank">BTC123</a>
							</li>
							<li>
								<a href="http://chainb.com/" target="_blank">铅笔</a>
							</li>
							<li>
								<a href="https://www.coindesk.com/" target="_blank">coindesk</a>
							</li>
							<li>
								<a href="http://www.qukuaiwang.com.cn/" target="_blank">区块链导航</a>
							</li>
							<li>
								<a href="http://www.qukuaiwang.com.cn/" target="_blank">区块链</a>
							</li>
							<li>
								<a href="https://www.7234.cn/" target="_blank">链世界</a>
							</li>
							<li>
								<a href="https://www.feixiaohao.com/" target="_blank">非小号</a>
							</li>
							<li>
								<a href="https://www.binance.com/" target="_blank">币安</a>
							</li>
							<li>
								<a href="https://www.coingogo.com/" target="_blank">币源社区</a>
							</li>
							<li>
								<a href="http://bitkan.com/" target="_blank">币看</a>
							</li>
							<li>
								<a href="https://www.coolcoin.com/" target="_blank">酷币</a>
							</li>
							<li>
								<a href="https://www.btc98.com/" target="_blank">比特酒吧</a>
							</li>
							<li>
								<a href="http://sl.vc/" target="_blank">共享财经</a>
							</li>
							<li>
								<a href="http://www.chainfor.com/" target="_blank">链向财经</a>
							</li>
							<li>
								<a href="http://jgy.com/" target="_blank">九个亿财经</a>
							</li>
						</ul>
					</div>
				</footer>
			</div>
		</div>
	</body>
	<script src="../js/jquery-2.1.1.js" type="text/javascript" charset="utf-8"></script>
	<script src="../js/index.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var get_url = 'http://api.btcdata.top/api/api_kktoken';
		var coin_id = '';
		var exchange_id = '';
		var url;
		$(document).ready(function() {
			ajax_fordata();
		});

		getExchange();

		function ajax_fordata() {
			var url = document.location.toString();
			var arrObj = url.split("?");
			if(arrObj.length > 1) {
				var arrPara = arrObj[1].split("&");
				var arr;
				for(var i = 0; i < arrPara.length; i++) {
					arr = arrPara[i].split("=");
					if(arr[0] == 'coin_id') {
						coin_id = arr[1]
					}
					if(arr[0] == 'exchange_id') {
						exchange_id = arr[1]
					}
				}
			} else {
				document.location.href = '../index.html'
				return;
			}
			if(exchange_id != '') {
				url = get_url + '/detail/?coin_id=' + coin_id + '&exchange_id=' + exchange_id
				price_val1.style.display = 'inline'
				eq_rmb.style.display = 'block'
			} else {
				url = get_url + '/detail/?coin_id=' + coin_id
				price_val.style.display = 'inline'
			}
			if(coin_id != '') {
				$.get(url, function(res) {
					if(res.success) {
						var data = res.data;
						var count, count_sj;

						//基本信息
						src_img.src = data.icon_url;
						title_name.innerHTML = data.name;
						title_name.innerHTML += ' ' + data.chinese_name
						if(exchange_id != '') {
							if(data.price >= 100) {
								price_val1.innerHTML += parseInt(data.price) + data._transaction_name
							} else {
								price_val1.innerHTML += parseFloat(data.price).toFixed(3) + data._transaction_name
							}
							if(data.price_cny >= 100) {
								eq_rmb.innerHTML += parseInt(data.price_cny)
							} else {
								eq_rmb.innerHTML += parseFloat(data.price_cny).toFixed(3)
							}
						} else {
							if(data.price_cny >= 100) {
								price_val.innerHTML += parseInt(data.price_cny)
							} else {
								price_val.innerHTML += parseFloat(data.price_cny).toFixed(3)
							}
						}
						if(data.high >= 100) {
							highest_val.innerHTML += parseInt(data.high)
						} else {
							highest_val.innerHTML += parseFloat(data.high).toFixed(3)
						}
						if(data.low >= 100) {
							lowest_val.innerHTML += parseInt(data.low)
						} else {
							lowest_val.innerHTML += parseFloat(data.low).toFixed(3)
						}
						if(data.percent_change24h >= 0) {
							price_rage.innerHTML = '+' + parseFloat(data.percent_change24h).toFixed(2) + '%'
						} else {
							price_rage.innerHTML = parseFloat(data.percent_change24h).toFixed(2) + '%'
							price_rage.style.backgroundColor = 'rgba(224,0,69,1)'
						}

						//流通量，总发行量
						tn_val_data.innerHTML = parseInt(data.available_supply).toLocaleString()
						ms_val_data.innerHTML = parseInt(data.total_supply).toLocaleString()
						tn_val_unit.innerHTML = data.coin_symbol
						ms_val_unit.innerHTML = data.coin_symbol

						//24小时交易额
						trade_val.innerHTML += parseInt(data.volume_cny).toLocaleString()
						trade_equ_val.innerHTML += parseInt(data.volume_cny / data.btc_price_cny) + ' ' + 'BTC'
						trade_equ_rank.innerHTML = '第' + data.rank + '名'

						//24小时交易所
						exch_name_icon.src = data.max_exchange.icon
						exch_name_font.innerHTML = data.max_exchange.exchange_name
						exch_val_rage.innerHTML = parseFloat(data.max_exchange.proportion).toFixed(2) + '%'

						//币历史
						name_p_font.innerHTML = data.name + '/' + data.coin_symbol
						if(data.publish_time) {
							time_p_font.innerHTML = data.publish_time.split(' ')[0]
						}

						rank_p_font.innerHTML = data.rank
						book_p_font.innerHTML = data.white_paper
						price_p_font.innerHTML += parseInt(data.market_cap_cny).toLocaleString() + ' ' + '/' + ' ' + parseInt(data.market_cap_cny / data.btc_price_cny).toLocaleString() + ' ' + 'BTC'
						for(var i = 0; i < data.coin_label.length; i++) {
							var span = document.createElement('span')
							span.innerText = data.coin_label[i].label
							relate_div_tips.append(span)
						}
						if(data.project_introduction) {
							span_content.innerHTML = data.project_introduction
						} else {
							detail_div.style.display = 'none'
						}

						//ADA行情
						if(data.exchange_coin_info.length > 5) {
							count = 5;
							release.style.display = 'block'
						} else {
							count = data.exchange_coin_info.length;
						}
						for(var j = 0; j < count; j++) {
							var price, new_price;
							if(data.exchange_coin_info[j].price >= 100) {
								price = parseInt(data.exchange_coin_info[j].price)
							} else {
								price = parseFloat(data.exchange_coin_info[j].price).toFixed(3)
							}
							if(data.exchange_coin_info[j].new_price >= 100) {
								new_price = parseInt(data.exchange_coin_info[j].new_price)
							} else {
								new_price = parseFloat(data.exchange_coin_info[j].new_price).toFixed(3)
							}
							var li = document.createElement('li');
							li.className = 'lists_data'
							li.innerHTML = `<ul class="lists_data_box">
												<li class="li_rank">${j+1}</li>
												<li class="li_exch">
													<span><img src=${data.exchange_coin_info[j].icon} onerror="this.src = '../img/defaultIcon.png'" /></span>
													<span>${data.exchange_coin_info[j].exchange_name}</span>
												</li>
												<li class="li_pair">${data.exchange_coin_info[j].transaction_name}</li>
												<li class="li_price">${price}/￥${new_price}</li>
												<li class="li_turnover">${parseInt(data.exchange_coin_info[j].volume_of_business/10000).toLocaleString()}万</li>
												<li class="li_percent">${(data.exchange_coin_info[j].proportion).toLocaleString()}%</li>
												<li class="li_status">
												<img src="../img/mini_colected.png" />
												</li>
											</ul>`
							lists_content.append(li)
						}
					} else {
						document.location.href = '/index.html'
						return;
					}
				}, 'json');
			} else {
				document.location.href = '/index.html'
				return;
			}
		}
		examine_btn = function() {
			$.get(get_url + '/detail/?coin_id=' + coin_id + '&exchange_id=' + exchange_id, function(data) {
				if(data.success) {
					var data = data.data;
					release.style.display = 'none'
					for(var j = 5; j < data.exchange_coin_info.length; j++) {
						var price, new_price;
						
						if(data.exchange_coin_info[j].price >= 100) {
							price = parseInt(data.exchange_coin_info[j].price)
						} else {
							price = parseFloat(data.exchange_coin_info[j].price).toFixed(3)
						}
						if(data.exchange_coin_info[j].new_price >= 100) {
							new_price = parseInt(data.exchange_coin_info[j].new_price)
						} else {
							new_price = parseFloat(data.exchange_coin_info[j].new_price).toFixed(3)
						}
						var li = document.createElement('li');
						li.className = 'lists_data'
						li.innerHTML = `<ul class="lists_data_box">
												<li class="li_rank">${j+1}</li>
												<li class="li_exch">
													<span><img src=${data.exchange_coin_info[j].icon} onerror="this.src = '../img/defaultIcon.png'" /></span>
													<span>${data.exchange_coin_info[j].exchange_name}</span>
												</li>
												<li class="li_pair">${data.exchange_coin_info[j].transaction_name}</li>
												<li class="li_price">${price}/￥${new_price}</li>
												<li class="li_turnover">${parseInt(data.exchange_coin_info[j].volume_of_business/10000).toLocaleString()}万</li>
												<li class="li_percent">${(data.exchange_coin_info[j].proportion).toLocaleString()}%</li>
												<li class="li_status">
												<img src="../img/mini_colected.png" />
												</li>
											</ul>`
						lists_content.append(li)
					}
				}
			})
		}
	</script>

</html>

<!--
	
								<div class="event">
								<p class="event_title">大事纪要</p>
								<ul class="event_text" id="event_text">
									<li class="event_list">
										<div class="link_point"><span></span></div>
										<div class="link_line"></div>
										<div class="text_content">
											<p class="content_time">2018-01-09</p>
											<p class="content_brief">
												2008年爆发全球金融危机，当时有人用“中本聪”的化名发表了一篇论文，描述了比特币的模式。和法定货币相比，比特币没有一个集中的发行方，而是由网络节点的计算生 成，谁都有可能参与制造比特币，而且可以全世界流通，可以在任意一台接入互联网的电脑上买卖，不管身处何方，任何人都可以挖掘、购买、出售或收取比特币，并且在交易 过程中外人无法辨认用户身份信息。
											</p>
										</div>
									</li>
									<li class="event_list">
										<div class="link_point"><span></span></div>
										<div class="link_line"></div>
										<div class="text_content">
											<p class="content_time">2018-01-09</p>
											<p class="content_brief">
												2008年爆发全球金融危机，当时有人用“中本聪”的化名发表了一篇论文，描述了比特币的模式。和法定货币相比，比特币没有一个集中的发行方，而是由网络节点的计算生 成，谁都有可能参与制造比特币，而且可以全世界流通，可以在任意一台接入互联网的电脑上买卖，不管身处何方，任何人都可以挖掘、购买、出售或收取比特币，并且在交易 过程中外人无法辨认用户身份信息。
											</p>
										</div>
									</li>
									<li class="event_list">
										<div class="link_point"><span></span></div>
										<div class="link_line hidline"></div>
										<div class="text_content">
											<p class="content_time">2018-01-09</p>
											<p class="content_brief">
												2017年1月22日晚间，火币网、比特币中国与OKCoin币行相继在各自官网发布公告称，为进一步抑制投机，防止价格剧烈波动，各平台将于2017年1月24日中午12：00起 开始收取交易服务费，服务费按成交金额的0.2%固定费率收取，且主动成交和被动成交费率一致。5月5日，OKCoin币行网的最新数据显示，比特币的价格刚刚再度刷新历史， 截止发稿前最高触及9222点高位。
											</p>
										</div>
									</li>
								</ul>
								<p class="release">查看全部</p>
							</div>

							<div class="hotnews">
								<p class="hotnews_title">最新信息</p>
								<ul class="hotnews_text">
									<li class="hotnews_list">
										<div class="link_point"><span></span></div>
										<div class="link_line"></div>
										<div class="text_content">
											<p class="content_time">
												<span class="origin_time">2018-01-09 14:27</span>
												<span class="origin_link">来源：<span>ADA推特</span></span>

											</p>
											<p class="content_author">
												<div class="author_thumb">
													<img src="../img/headpic-.jpg" />
												</div>
												<div class="author_msg">
													<p class="msg_name">ADA挖矿机</p>
													<span class="msg_tips">ADA官方</span>
												</div>

											</p>
											<p class="content_brief">
												<span>	The global financial crisis broke out in 2008, when someone published a paper in the name of "Zhong Ben cong", describing the pattern of bitcoin. 
Compared with the legal currency, bitcoin does not have a centralized issuer, but a network node's computer. Everyone can participate in the manufacture 
of bitcoin, and it can circulate all over the world, and can buy and sell on any computer that access the Internet. No matter where it is, anyone can dig, buy,
sell or collect bitcoins, and it is trading.In the process, the Chinese and foreign people can not identify the user identity information.
												</span>

											</p>
											<p class="content_translate">
												<span>有道翻译</span>
												<span>
		2008年爆发全球金融危机，当时有人用“中本聪”的化名发表了一篇论文，描述了比特币的模式。和法定货币相比，比特币没有一个集中的发行方，而是由网络节点的计算
生成，谁都有可能参与制造比特币，而且可以全世界流通，可以在任意一台接入互联网的电脑上买卖，不管身处何方，任何人都可以挖掘、购买、出售或收取比特币，并且
在交易过程中外人无法辨认用户身份信息。
</span>

											</p>
										</div>
									</li>
									<li class="hotnews_list">
										<div class="link_point"><span></span></div>
										<div class="link_line hidline"></div>
										<div class="text_content">
											<p class="content_time">
												<span class="origin_time">2018-01-09 14:27</span>
												<span class="origin_link">来源：<span>ADA推特</span></span>

											</p>
											<p class="content_author">
												<div class="author_thumb hidline" style="display: none;">
													<img src="../img/headpic-.jpg" />
												</div>
												<div class="author_msg">
													<p class="msg_name report">研究报道文章</p>
													<!--<span class="msg_tips">ADA官方</span>-->
<!--</div>

											</p>
											<p class="content_brief">
												<span>	
												2008年爆发全球金融危机，当时有人用“中本聪”的化名发表了一篇论文，描述了比特币的模式。和法定货币相比，比特币没有一个集中的发行方，而是由网络节点的计算生 成，谁都有可能参与制造比特币，而且可以全世界流通，可以在任意一台接入互联网的电脑上买卖，不管身处何方，任何人都可以挖掘、购买、出售或收取比特币，并且在交易 过程中外人无法辨认用户身份信息。
												</span>
												<a href="###">查看全部</a>
											</p>
											<p class="content_translate hidline">
												<span>有道翻译</span>
												<span>
		2008年爆发全球金融危机，当时有人用“中本聪”的化名发表了一篇论文，描述了比特币的模式。和法定货币相比，比特币没有一个集中的发行方，而是由网络节点的计算
生成，谁都有可能参与制造比特币，而且可以全世界流通，可以在任意一台接入互联网的电脑上买卖，不管身处何方，任何人都可以挖掘、购买、出售或收取比特币，并且
在交易过程中外人无法辨认用户身份信息。
												</span>

											</p>
										</div>
									</li>

								</ul>
								<p class="release">查看全部</p>
							</div>-->